// Fill out your copyright notice in the Description page of Project Settings.


#include "UI/PlayerHUD.h"

#include "Components/TextBlock.h"

void UPlayerHUD::SetHP(int NewHP)
{
	const FString Str = FString::Printf(TEXT("血量：%d"), NewHP);
	HPText->SetText(FText::FromString(Str));
}

void UPlayerHUD::SetDiamonds(int Amount)
{
	const FString Str = FString::Printf(TEXT("钻石：%d"), Amount);
	DiamondsText->SetText(FText::FromString(Str));
}

void UPlayerHUD::SetLevel(int Index)
{
	const FString Str = FString::Printf(TEXT("等级：%d"), Index);
	LevelText->SetText(FText::FromString(Str));
}
